Release 10.1A: OpenEdge Development:
Messaging and ESB
subscribe procedure
Subscribes to a topic.
Syntax
Parameters
topicNameThe topic to which the procedure subscribes.
subscriptionNameA
subscriptionNameparameter with a value other thanUNKNOWNspecifies a durable subscription. Durable subscriptions require that the JMS client have a client ID identifier; the client must callsetClientIDin thepubsubsession.pobject (or set the default client ID on the server side). If thesubscriptionNamevalue isUNKNOWNor an empty string, the subscription is not durable.messageSelectorA message selector (optional).
noLocalPublicationsA Boolean flag controlling whether the application receives its own messages (optional). The default is
FALSE(the session receives its own publications).messageConsumerThe Message Consumer object.
Applies to
Session objects
Notes
- The messages are handled asynchronously by the
messageConsumerobject.- A
subscriptionNameparameter with a value other thanUNKNOWNspecifies a durable subscription. If thesubscriptionNamevalue isUNKNOWNor an empty string, the subscription is not durable.- Durable subscriptions require the JMS client to have a client ID identifier.
- The client must call the setClientID procedure in the
pubsubsessionobject (or set the default client ID on the server side) if a durable subscription is desired. The default ofnoLocalPublicationsisFALSE. The session, by default, get its own publications.- This procedure executes remotely (sends a message to the OpenEdge Adapter for SonicMQ).
See also
cancelDurableSubscription procedure, publish procedure, subscribe procedure
For more information, see the "Publishing messages to a topic" section, the "Subscribing to a topic" section, the "Durable subscriptions" section, and the "Methods unique to Pub/Sub messaging" section.
For an example, see the "Pub/Sub messaging example" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |